<template>
	<view class="pages">
		<!-- 头部 -->
		<pageHeader @getIndexData="getIndexData"/>
		
		<view class="content">
			<!-- 白名单-->
			<view class="boxBg boxBg--1">
				<view class="tipsBox">
					<view class="tipsBox-left">
						<view class="title">域名管理</view>
					</view>
					<view class="tipsBox-right">
					</view>
				</view>
				<view class="tableTopBox">
					<view class="tableTopBox-header">
						<view class="title">名称</view>
						<view class="title">域名 </view>
						<view class="title title--1"></view>
					</view>
					<view class="tableTopBox-list " v-if="isShowPages == true">
						<view class="tableTopBox-list__item" v-for="(item,index) in sysDomainList" :key="index" 
						 v-if="sysDomainList.length > 0">
							<view class="label">{{ item.name }}</view>
							<view class="label">{{ item.domain }}</view>
							<view class="label label--1" >
								<image @tap.stop="$tools.jump('/pages/index/index',item.id)" class="jion" src="@/static/public/jion.png" mode=""></image>
							</view>
						</view>
						<view class="initNoData" v-if="sysDomainList.length == 0">暂无数据...</view>
					</view>
				</view>
			</view>
		</view>
		 
		 <!-- 底部 -->
		<pageFooter />
		
	</view>
</template>

<script>
	import md5 from '../../common/js/md5.js';
	export default {
		components:{
		},
		data(){
			return{
				isShowPages: false,
				sysDomainList: [
					// {id: 1,name: '394853894539478',domain: '192.00.942.0400'},
					// {id: 2,name: '394853894539478',domain: '192.00.942.0400'},
				],
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.isShowPages = false;
			this.sysDomainList = [];
			this.init();
		},
		methods: {
			init(){
				this.getSysDomainList();
			},
			getSysDomainList(){
				var data = {};
				this.$Ajax('/api/user/info/getSysDomainList',data,res => {
						if (res.success) {
							this.sysDomainList = res.data.sysDomainList;
							this.isShowPages = true;
						} 
					},err =>{
					}
				);
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		.tableTopBox{
			height: auto;
			overflow: auto;
			&-list{
				height: auto;
				overflow: auto;
			}
		}
	}
</style>